import { axios } from '@/utils/request'
import api from './apiUrl'

export function StatisticsContracts (parameter) {
  return axios({
    url: api.Statistics.contracts,
    method: 'post',
    data: parameter
  })
}

export function StatisticsCertificates (parameter) {
  return axios({
    url: api.Statistics.certificates,
    method: 'post',
    data: parameter
  })
}

export function countNumGroupByDepThisYear (parameter) {
  return axios({
    url: api.Statistics.countNumGroupByDepThisYear,
    method: 'post',
    data: parameter
  })
}

export function countDepGroupByYear (parameter) {
  return axios({
    url: api.Statistics.countDepGroupByYear,
    method: 'post',
    data: parameter
  })
}

export function countNumByTypeYear (parameter) {
  return axios({
    url: api.Statistics.countNumByTypeYear,
    method: 'post',
    data: parameter
  })
}

export function SortContractsByAmount (parameter) {
  return axios({
    url: api.Statistics.contractRankByAmount,
    method: 'post',
    data: parameter
  })
}

export function SortContractsByDep (parameter) {
  return axios({
    url: api.Statistics.contractRankByDep,
    method: 'post',
    data: parameter
  })
}

export function certTypeRankThisYear (parameter) {
  return axios({
    url: api.Statistics.certTypeRankThisYear,
    method: 'post',
    data: parameter
  })
}

export function sumContractNatureByYear (parameter) {
  return axios({
    url: '/statistics/contracts/sumContractNatureByYear',
    method: 'post',
    data: parameter
  })
}

export function sumContractNatureByYearAndDep (parameter) {
  return axios({
    url: '/statistics/contracts/sumContractNatureByYearAndDep',
    method: 'post',
    data: parameter
  })
}
